<template>
  <div>
    <h3>{{detail.title}}</h3>
    <hr>
    <div class="content" v-html="detail.content">
    </div>
  </div>
</template>

<script>
export default {

  data () {
    return {
        id:this.$route.params.id,
        detail:[],
    }
  },

  methods: {
      getDate(){
          this.$http.get('api/goods/getdesc/'+this.id).then(res=>{
              if(res.body.status === 0) {
                  this.detail = res.body.message[0];
              }
          })
      }
  },

  created () {
      this.getDate()
  }
}
</script>

<style lang='less' >
h3 {
    font-size: 16px;
    color: #226aff;
    text-align: center;
    margin: 15px 0;
}
.content {
    padding: 10px;
    img {
        width: 100%;
        height: 100%;
    }
}
</style>
